package me.liangdi.spring.todo.repository;

import me.liangdi.spring.todo.bean.Todo;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * TODO_bean Repo接口
 * Created by liangdi on 1/5/16.
 */
public interface TodoRepository extends MongoRepository<Todo,String>{
    /**
     * 根据 todoListId 列出Todos
     * @param todoListId
     * @param deleted
     * @return
     */
    List<Todo> findByTodoListIdAndDeletedOrderByOrderAsc(String todoListId,boolean deleted);
}
